package cn.hncu.booksManagementSystem.book.business.ebo;

import java.util.Collection;

import cn.hncu.booksManagementSystem.book.business.ebi.BookEbi;
import cn.hncu.booksManagementSystem.book.dao.dao.BookDAO;
import cn.hncu.booksManagementSystem.book.dao.factory.BookDAO_Factory;
import cn.hncu.booksManagementSystem.book.vo.BookModel;
import cn.hncu.booksManagementSystem.book.vo.BookQueryModel;
/**
 * Description:
 *	BookEbi接口实现类
 */
public class BookEbo implements BookEbi {
	//注入数据层的dao
	private BookDAO dao = BookDAO_Factory.getInstanceOfBookDAO();
	@Override
	public boolean add(BookModel book) {
		return dao.add(book);
	}

	@Override
	public boolean delete(BookModel book) {
		return dao.delete(book);
	}

	@Override
	public boolean update(BookModel book) {
		return dao.update(book);
	}

	@Override
	public BookModel getBookModelById(String id) {
		return dao.getUserModelById(id);
	}

	@Override
	public Collection<BookModel> getAll() {
		return dao.getAll();
	}

	@Override
	public Collection<BookModel> getBooksByCondition(BookQueryModel bqm) {
		return dao.getUsersByCondition(bqm);
	}

}
